package ink.teamwork.battery.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class WechatResponse {

    @JsonProperty("openid")
    public String openId;

    @JsonProperty("session_key")
    public String sessionKey;

    @JsonProperty("unionid")
    public String unionId;

    @JsonProperty("errcode")
    public Integer errCode;

    @JsonProperty("errmsg")
    public String errMsg;

//    @JsonProperty("phone_info")
//    public PhoneInfo phoneInfo;

    @JsonProperty("access_token")
    public String accessToken;

    @JsonProperty("expires_in")
    public Integer expiresIn;

    @JsonProperty("scope")
    public String scope;

    @JsonProperty("is_snapshotuser")
    public Integer isSnapshotUser;

    @JsonProperty("ticket")
    public String ticket;
    //    @Data
//    public class PhoneInfo {
//
//        @JsonProperty("phoneNumber")
//        public String phoneNumber;
//
//        @JsonProperty("purePhoneNumber")
//        public String purePhoneNumber;
//
//        @JsonProperty("countryCode")
//        public String countryCode;
//
//        @JsonProperty("wastermark")
//        public WasterMark wasterMark;
//
//        @Data
//        public class WasterMark {
//
//            @JsonProperty("timestamp")
//            public Long timestamp;
//
//            @JsonProperty("appid")
//            public String appId;
//
//        }
//    }
    public String nickname;

    public Integer sex;

    public String language;

    public String city;

    public String province;

    public String country;

    @JsonProperty("headimgurl")
    public String avatar;

    public String[] privilege;

    public String refreshToken;


}
